home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / misc / egs.lha / EGS / EGS_Devels / doc / egsgfx.doc < prev    next >
Text File  |  1993-02-16  |  20KB  |  1,010 lines

  1. /*
  2. *  $
  3. *  $ FILE     : egsgfx.doc
  4. *  $ VERSION  : 1
  5. *  $ REVISION : 1
  6. *  $ DATE     : 08-Feb-93 10:04
  7. *  $
  8. *  $ Author   : mvk
  9. *  $
  10. *
  11. *
  12. * (c) Copyright 1990/93 VIONA Development
  13. *     All Rights Reserved
  14. *
  15. */
  16.  
  17. egsgfx.library/EG_AreaCircle
  18. egsgfx.library/EG_AreaCurve
  19. egsgfx.library/EG_AreaCurveL
  20. egsgfx.library/EG_AreaDraw
  21. egsgfx.library/EG_AreaEnd
  22. egsgfx.library/EG_AreaMove
  23. egsgfx.library/EG_CloseFont
  24. egsgfx.library/EG_CopyBitMapRastPort
  25. egsgfx.library/EG_CopyRectangle
  26. egsgfx.library/EG_CreateRastPort
  27. egsgfx.library/EG_Curve
  28. egsgfx.library/EG_CurveL
  29. egsgfx.library/EG_DeleteRastPort
  30. egsgfx.library/EG_Draw
  31. egsgfx.library/EG_Ellipse
  32. egsgfx.library/EG_FillMask
  33. egsgfx.library/EG_FillMaskSeg
  34. egsgfx.library/EG_Flood
  35. egsgfx.library/EG_InitArea
  36. egsgfx.library/EG_InstallClipRegion
  37. egsgfx.library/EG_Move
  38. egsgfx.library/EG_OpenFont
  39. egsgfx.library/EG_ReadPixel
  40. egsgfx.library/EG_RectFill
  41. egsgfx.library/EG_RemoveClipRegion
  42. egsgfx.library/EG_ScrollRastPort
  43. egsgfx.library/EG_SetAPen
  44. egsgfx.library/EG_SetBPen
  45. egsgfx.library/EG_SetDrMd
  46. egsgfx.library/EG_SetFont
  47. egsgfx.library/EG_SetMask
  48. egsgfx.library/EG_SetSoftStyle
  49. egsgfx.library/EG_StdFont
  50. egsgfx.library/EG_Text
  51. egsgfx.library/EG_TextLength
  52. egsgfx.library/EG_WritePixel
  53.  
  54.  
  55. egsgfx.library/EG_AreaCircle
  56.  
  57. NAME
  58.   EG_AreaCircle   draw a filled circle
  59.  
  60. SYNOPSIS
  61.   EG_AreaCircle(rast, x, y, r)
  62.         A0    D0 D1 D2
  63.  
  64.   EG_RastPortPtr   rast;
  65.   WORD             x, y, r;
  66.  
  67. FUNCTION
  68.   Draws a filled circle in the aPen color. This function requiers a tmpRas
  69.   bitmap. If there is none, it allocates one and frees it afterwards. This
  70.   allocation requiers time, which can be saved by allocating an own tmpRas
  71.   bitmap for the rastport.
  72.  
  73. INPUTS
  74.   rast     : rastport in which to draw
  75.   x, y     : centre of the circle
  76.   r        : radius
  77.  
  78. RETURNS
  79.  
  80.  
  81.  
  82. egsgfx.library/EG_AreaCurve
  83.  
  84. NAME
  85.   EG_AreaCurve   draw a filled bezier curve
  86.  
  87. SYNOPSIS
  88.   EG_AreaCurve(rast, x2, y2, x3, y3, x4, y4)
  89.            A0    D0  D1  D2  D3  D4  D5
  90.  
  91.   EG_RastPortPtr rast;
  92.   WORD           x2, y2, x3, y3, x4, y4;
  93.  
  94. FUNCTION
  95.   Adds a bezier curve to a filled object (see also AreaMove, AreaDraw and
  96.   AreaEnd). The curve is halved until the pieces are smaller then the limit
  97.   given in the rastport. Then the pieces are drawn using AreaDraw. This
  98.   function requiers a large areaInfo structure. The current area cursor
  99.   in the rastport is the starting location, the point x4/y4 is the end
  100.   location.
  101.  
  102. INPUTS
  103.   rast     : destination rastport
  104.   x2, y2   : direction at curve start
  105.   x3, y3   : direction at curve end
  106.   x4, y4   : endpoint
  107.  
  108. RETURNS
  109.  
  110.  
  111.  
  112. egsgfx.library/EG_AreaCurveL
  113.  
  114. NAME
  115.   EG_AreaCurveL   draw a filled bezier curve
  116.  
  117. SYNOPSIS
  118.   EG_AreaCurveL(rast, x2, y2, x3, y3, x4, y4)
  119.         A0    D0  D1  D2  D3  D4  D5
  120.  
  121.   EG_RastPortPtr rast;
  122.   LONG           x2, y2, x3, y3;
  123.   WORD           x4, y4;
  124.  
  125. FUNCTION
  126.   Adds a bezier curve to a filled object (see also AreaMove, AreaDraw and
  127.   AreaEnd). The curve is halved until the pieces are smaller then the limit
  128.   given in the rastport. Then the pieces are drawn using AreaDraw. This
  129.   function requiers a large areaInfo structure. The current area cursor
  130.   in the rastport is the starting location, the point x4/y4 is the end
  131.   location. The values of x2 to y3 are 32 bit fractionals with the
  132.   fractional part starting at bit 16. This function is usefull to draw small
  133.   curves very accurate.
  134.  
  135. EXAMPLE
  136.   This function can be used to draw a filled ellipse.
  137.  
  138.   x, y   : median
  139.   a, b   : halfaxis
  140.  
  141.   AreaMove(rast, x, y-b);
  142.   AreaCurveL(rast, 36194*a, 0, 0, -36194*b, x+a, y);
  143.   AreaCurveL(rast, 0, 36194*b, 36194*a, 0, x, y+b);
  144.   AreaCurveL(rast, -36194*a, 0, 0, 36194*b, x-a, y);
  145.   AreaCurveL(rast, 0, -36194*b, -36194*a, 0, x, y-b);
  146.   AreaEnd(rast);
  147.  
  148. INPUTS
  149.   rast     : destination rastport
  150.   x2, y2   : direction at curve start (multiplied by 65536)
  151.   x3, y3   : direction at curve end (multiplied by 65536)
  152.   x4, y4   : endpoint
  153.  
  154. RETURNS
  155.  
  156.  
  157.  
  158. egsgfx.library/EG_AreaDraw
  159.  
  160. NAME
  161.   EG_AreaDraw   draw a edge of a filled polygon
  162.  
  163. SYNOPSIS
  164.   EG_AreaDraw(rast, x, y)
  165.           A0    D0 D1
  166.  
  167.   EG_RastPortPtr   rast;
  168.   WORD             x, y;
  169.  
  170. FUNCTION
  171.   Adds an edge to a filled polygon (see also AreaMove, AreaCurve and
  172.   AreaEnd). The polygon is drawn using AreaEnd. This function requires a
  173.   areaInfo structure attached to the rastPort.
  174.  
  175. INPUTS
  176.   rast   : destination rastport
  177.   x, y   : end of line, startpoint is current areacursor location.
  178.  
  179. RETURNS
  180.  
  181.  
  182.  
  183. egsgfx.library/EG_AreaEnd
  184.  
  185. NAME
  186.   EG_AreaEnd   end area polygon definition and draw
  187.  
  188. SYNOPSIS
  189.   EG_AreaEnd(rast)
  190.          A0
  191.  
  192.   EG_RastPortPtr  rast;
  193.  
  194. FUNCTION
  195.   Ends an open area polygon and draws it, using the aPen color. This function
  196.   needs a tmpRas bitmap. If there is none the function creates one and frees
  197.   it afterwards.
  198.  
  199. INPUTS
  200.  
  201. RETURNS
  202.  
  203.  
  204.  
  205. egsgfx.library/EG_AreaMove
  206.  
  207. NAME
  208.   EG_AreaMove   begin new area polygon
  209.  
  210. SYNOPSIS
  211.   EG_AreaMove(rast, x, y)
  212.           A0    D0 D1
  213.  
  214.   EG_RastPortPtr   rast;
  215.   WORD             x, y;
  216.  
  217. FUNCTION
  218.   Moves the area cursor to a new starting location. Closes an open polygon.
  219.   You can draw several polygons with one AreaEnd. If the polygons intersect
  220.   each other the intersection will be excluded (exclusiv or). This can be
  221.   used to draw free areas in polygons.
  222.  
  223. INPUTS
  224.  
  225. RETURNS
  226.  
  227.  
  228.  
  229. egsgfx.library/EG_CloseFont
  230.  
  231. NAME
  232.   EG_CloseFont   close a font
  233.  
  234. SYNOPSIS
  235.   EG_CloseFont(font)
  236.            A0
  237.  
  238.   EG_EFontPtr  font;
  239.  
  240. FUNCTION
  241.   Close a font which was opened using EG_OpenFont.
  242.  
  243. INPUTS
  244.  
  245. RETURNS
  246.  
  247.  
  248.  
  249. egsgfx.library/EG_CopyBitMapRastPort
  250.  
  251. NAME
  252.   EG_CopyBitMapRastPort   copy rectangle of a bitmap into a rastport
  253.  
  254. SYNOPSIS
  255.   EG_CopyBitMapRastPort(src, rast, xs, ys, w, h, xd, yd)
  256.             A0   A1    D0  D1  D2 D3 D4  D5
  257.  
  258.   E_EBitMapPtr   src;
  259.   EG_RastPortPtr rast;
  260.   WORD           xs, ys, w, h, xd, yd;
  261.  
  262. FUNCTION
  263.   Copies a rectangluar area from a bitmap into a rastport. Clipping is
  264.   done for the destination rastport as specified.
  265.  
  266. INPUTS
  267.   src     : source bitmap
  268.   rast    : destination rastport
  269.   xs, ys  : starting location in the bitmap
  270.   w, h    : dimensions of the rectangle
  271.   xd, yd  : destination location in the rastport
  272.  
  273. RETURNS
  274.  
  275.  
  276.  
  277. egsgfx.library/EG_CopyRectangle
  278.  
  279. NAME
  280.   EG_CopyRectangle   copy rectangle of a rastport into a rastport
  281.  
  282. SYNOPSIS
  283.   EG_CopyBitMapRastPort(src, dst, xs, ys, w, h, xd, yd)
  284.             A0   A1   D0  D1  D2 D3 D4  D5
  285.  
  286.   EG_RastPortPtr src, dst;
  287.   WORD           xs, ys, w, h, xd, yd;
  288.  
  289. FUNCTION
  290.   Copies a rectangluar area from a rastport into a rastport. Clipping is
  291.   done for the destination rastport as specified. The source should not
  292.   exceed the limits of its rastport. The two rastports may be identical
  293.  
  294. INPUTS
  295.   src     : source rastport
  296.   rast    : destination rastport
  297.   xs, ys  : starting location in the source rastport
  298.   w, h    : dimensions of the rectangle
  299.   xd, yd  : destination location in the destination rastport
  300.  
  301. RETURNS
  302.  
  303.  
  304.  
  305. egsgfx.library/EG_CheckRectangle
  306.  
  307. NAME
  308.   EG_CheckRectangle    checks if rectangle in inside current clipping area
  309.  
  310. SYNOPSIS
  311.   writable = EG_CheckRectangle (rport, rect);
  312.   D0                            A1    A2
  313.  
  314.   EG_RastPortPtr   rport;
  315.   EB_ClipRectPtr   rect;
  316.   BOOL             writable;
  317.  
  318. FUNCTION
  319.   Checks the rect against the current clipping region and finds out if the
  320.   area specified in rect is completely clipped out or not.
  321.   This is useful during refresh of windows where some areas could take
  322.   a long time to refresh. If this function, however, returns FALSE, there
  323.   is no need to refresh the rectangle in question. This function is quite
  324.   fast, and compared to e.g. loading a bitmap from disk or rendering text
  325.   or graphic elements, the time is well spent.
  326.  
  327. INPUTS
  328.   rport  : rastport in question
  329.   rect   : rectangle to check
  330.  
  331. RETURNS
  332.   TRUE  - if at least one pixel in the specified rectangle is writable, and
  333.       updating the area will have an effect.
  334.   FALSE - if the entire area specified in rect is clipped out, and
  335.       rendering into the area will have no effect at all.
  336.  
  337.  
  338.  
  339.  
  340. egsgfx.library/EG_CreateRastPort
  341.  
  342. NAME
  343.   EG_CreateRastPort   create a rastport
  344.  
  345. SYNOPSIS
  346.   rport = EG_CreateRastPort(layer, screen, map)
  347.   D0                        A0     A1      A2
  348.  
  349.   EG_RastPortPtr   rport;
  350.   EL_LayerPtr      layer;
  351.   E_EScreenPtr     screen;
  352.   E_EBitMapPtr     map;
  353.  
  354. FUNCTION
  355.   Creates a rastport for a layer, a screen or a bitmap.
  356.   If a screen is specified, it is used for MouseOn/MouseOff.
  357.   If neither a layer nor a map is specified, the destination bitmap will
  358.   be that of the screen. A layer and a bitmap exclude each other.
  359.  
  360.   You are allowed to use several RastPorts for one object in order to work
  361.   more independent.  If layers are used then even several tasks may use
  362.   the same RastPort simultaneously.
  363.  
  364. INPUTS
  365.   layer   : layer on which to create or NULL, for a non layer rastport
  366.   screen  : screen, on which the rastport resides or NULL, if the rastport
  367.         is not on a screen
  368.   map     : bitmap on which the rastport exists or NULL
  369.  
  370. RETURNS
  371.  
  372.  
  373.  
  374. egsgfx.library/EG_Curve
  375.  
  376. NAME
  377.   EG_Curve    draw a bezier curve
  378.  
  379. SYNOPSIS
  380.   EG_Curve(rast, x2, y2, x3, y3, x4, y4)
  381.        A0    D0  D1  D2  D3  D4  D5
  382.  
  383.   EG_RastPortPtr  rast;
  384.   WORD            x2, y2, x3, y3, x4, y4;
  385.  
  386. FUNCTION
  387.   Draws a bezier curve. The curve is halfed until the pieces are smaller
  388.   as in the rastport defined. Then the curve is drawn using draw.
  389.   The current cursor in the rastport is the starting location, the point x4/y4
  390.   is the end location. The point x2/y2 is a relative vector to the starting
  391.   point, x3/y3 is a relative vector to the ending point. This to vectors
  392.   specify the curves dirction.
  393.  
  394. INPUTS
  395.   rast     : destination rastport
  396.   x2, y2   : direction at curve start
  397.   x3, y3   : direction at curve end
  398.   x4, y4   : endpoint
  399.  
  400. RETURNS
  401.  
  402.  
  403.  
  404. egsgfx.library/EG_CurveL
  405.  
  406. NAME
  407.   EG_CurveL    draw a bezier curve
  408.  
  409. SYNOPSIS
  410.   EG_CurveL(rast, x2, y2, x3, y3, x4, y4)
  411.         A0    D0  D1  D2  D3  D4  D5
  412.  
  413.   EG_RastPortPtr  rast;
  414.   LONG            x2, y2, x3, y3;
  415.   WORD            x4, y4;
  416.  
  417. FUNCTION
  418.   Draws a bezier curve. The curve is halfed until the pieces are smaller
  419.   as in the rastport defined. Then the curve is drawn using draw.
  420.   The current cursor in the rastport is the starting location, the point x4/y4
  421.   is the end location. The point x2/y2 is a relative vector to the starting
  422.   point, x3/y3 is a relative vector to the ending point. This to vectors
  423.   specify the curves dirction. The values of x2 to y3 must be given as a 32
  424.   bit fractional number with the fractional part starting at bit 16. This is
  425.   usefull to draw small curves very accurate.
  426.  
  427. INPUTS
  428.   rast     : destination rastport
  429.   x2, y2   : direction at curve start (multipiled by 65536)
  430.   x3, y3   : direction at curve end (multipiled by 65536)
  431.   x4, y4   : endpoint
  432.  
  433. RETURNS
  434.  
  435.  
  436.  
  437. egsgfx.library/EG_DeleteRastPort
  438.  
  439. NAME
  440.   EG_DeleteRastPort   deletes a rastport
  441.  
  442. SYNOPSIS
  443.   EG_DeleteRastPort(rast)
  444.             A0
  445.  
  446.   EG_RastPortPtr   rast;
  447.  
  448. FUNCTION
  449.   Deletes a rastport which was createt using EG_CreateRastPort
  450.  
  451. INPUTS
  452.  
  453. RETURNS
  454.  
  455.  
  456.  
  457. egsgfx.library/EG_Draw
  458.  
  459. NAME
  460.   EG_Draw    draws a line
  461.  
  462. SYNOPSIS
  463.   EG_Draw(rast, x, y)
  464.       A0    D0 D1
  465.  
  466.   EG_RastPortPtr  rast;
  467.   WORD            x, y;
  468.  
  469. FUNCTION
  470.   Draws a line from the current cursor location to x, y. The cursor location
  471.   becomes x, y. The line is clipped according to the rastport.
  472.  
  473. INPUTS
  474.  
  475. RETURNS
  476.  
  477.  
  478.  
  479. egsgfx.library/EG_Ellipse
  480.  
  481. NAME
  482.   EG_Ellipse   draws an ellipse
  483.  
  484. SYNOPSIS
  485.   EG_Ellipse(rast, x, y, a, b)
  486.          A0    D0 D1 D2 D3
  487.  
  488.   EG_RastPortPtr  rast;
  489.   WORD            x, y, a, b;
  490.  
  491. FUNCTION
  492.   Draws an ellipse, around x, y the horizontal halfaxis is a, the vertical
  493.   is b. This function uses Curve, so the resolution of the ellipse depends
  494.   on the curvStep field of the rastport.
  495.  
  496. INPUTS
  497.  
  498. RETURNS
  499.  
  500.  
  501.  
  502. egsgfx.library/EG_FillMask
  503.  
  504. NAME
  505.   EG_FillMask   copies a one bit deep bitmap to a rastport
  506.  
  507. SYNOPSIS
  508.   EG_FillMask(rast, src, xd, yd)
  509.           A0    A1   D0  D1
  510.  
  511.   EG_RastPortPtr   rast;
  512.   E_EBitMapPtr     src;
  513.   WORD             xd, yd;
  514.  
  515. FUNCTION
  516.   Copies a one bitplane deep bitmap into a rastport, using aPen and bPen,
  517.   or aPen and transparency.
  518.  
  519. INPUTS
  520.   rast      : destination rastport
  521.   src       : source bitmap
  522.   xd, yd    : destination location
  523.  
  524. RETURNS
  525.  
  526.  
  527.  
  528. egsgfx.library/EG_FillMaskSeg
  529.  
  530. NAME
  531.   EG_FillMaskSeg   copies a rectangle of an one bit deep bitmap to a rastport
  532.  
  533. SYNOPSIS
  534.   EG_FillMask(rast, src, xs, ys, w, h, xd, yd)
  535.           A0    A1   D0  D1  D2 D3 D4  D5
  536.  
  537.   EG_RastPortPtr   rast;
  538.   E_EBitMapPtr     src;
  539.   WORD             xs, ys, w, h, xd, yd;
  540.  
  541. FUNCTION
  542.   Copies a rectangle out of an one bitplane deep bitmap into a rastport, using
  543.   aPen and bPen, or aPen and transparency.
  544.  
  545. INPUTS
  546.   rast      : destination rastport
  547.   src       : source bitmap
  548.   xs, ys    : starting locations in source bitmap
  549.   w, h      : size of rectangular area
  550.   xd, yd    : destination location
  551.  
  552. RETURNS
  553.  
  554.  
  555.  
  556. egsgfx.library/EG_Flood
  557.  
  558. NAME
  559.   EG_Flood    Flood rastport like areafill.
  560.  
  561. SYNOPSIS
  562.   EG_Flood(rp, mode, x, y)
  563.        a1   d2  d0  d1
  564.  
  565.   EG_RastPortPtr  rast;
  566.   WORD            x, y;
  567.  
  568.  
  569. FUNCTION
  570.   Fill all adjacent pixels to (x,y) if they are:
  571.       Mode 0: Different color than APen
  572.       Mode 1: The same color as the pixel at (x,y)
  573.  
  574.  
  575. INPUTS
  576.   rp    : pointer to EG_RastPort
  577.   (x,y) : coordinate in bitmap to start the flood fill at.
  578.   mode -  0 fill all adjacent pixels searching for border of color APen.
  579.       1 fill all adjacent pixels that have same pen number
  580.       as the one at (x,y).
  581.  
  582. NOTES
  583.   Having temporary in the rastport will speed up flood filling.
  584.  
  585.  
  586.  
  587.  
  588.  
  589. egsgfx.library/EG_InitArea
  590.  
  591. NAME
  592.   EG_InitArea   init area info structure
  593.  
  594. SYNOPSIS
  595.   iinfo = EG_InitArea(info, buffer, size)
  596.   D0                  A0    A1      D0
  597.  
  598.   EG_AreaInfoPtr   iinfo, info;
  599.   APTR             buffer;
  600.   WORD             size;
  601.  
  602. FUNCTION
  603.   Initializes an areainfo structure.
  604.  
  605. INPUTS
  606.   info     : unintialized areainfo structure
  607.   buffer   : pointer to a memory area for areapolygon vertices
  608.   size     : number of vertices that can be stored in this buffer
  609.  
  610. RETURNS
  611.   initialized area info structure, that can be assigned to a rastport
  612.  
  613.  
  614.  
  615. egsgfx.library/EG_InstallClipRegion
  616.  
  617. NAME
  618.   EG_InstallClipRegion   installs a clip region
  619.  
  620. SYNOPSIS
  621.   EG_InstallClipRegion(rast, rect)
  622.                A0    A1
  623.  
  624.   EG_RastPortPtr   rast;
  625.   EB_ClipRectPtr   rect;
  626.  
  627. FUNCTION
  628.   ClipRegions describe which regions of a RastPort may be written into.
  629.  
  630.   If a RastPort has no ClipRegion (only possible for unlayered RastPorts)
  631.   there might be some drawing outside the BitMap.  On the other hand, drawing
  632.   without clipping is slightly faster.
  633.  
  634.   If the RastPort uses a layer an additional ClipRegion restricts the
  635.   ordinary rectangular drawing region.
  636.  
  637.   A RastPort's ClipRegion consists of a list of ClipRects.  That list is
  638.   not changed by the EGSGfx library, i.e. a constant list is allowed.
  639.  
  640.   Before deleting a RastPort its ClipRegion should be removed.
  641.  
  642.   The ClipRegion must not be changed while it is connected to the RastPort.
  643.  
  644.   The old ClipRegion gets lost, so it should be removed using
  645.   EB_RemoveClipRegin before, or cached in a variable.
  646.  
  647. INPUTS
  648.  
  649. RETURNS
  650.  
  651.  
  652.  
  653. egsgfx.library/EG_Move
  654.  
  655. NAME
  656.   EG_Move    move graphics cursor
  657.  
  658. SYNOPSIS
  659.   EG_Move(rast, x, y)
  660.       A0    D0 D1
  661.  
  662.   EG_RastPortPtr  rast;
  663.   WORD            x, y;
  664.  
  665. FUNCTION
  666.   Moves the graphic cursor to x, y.
  667.  
  668. INPUTS
  669.  
  670. RETURNS
  671.  
  672.  
  673.  
  674. egsgfx.library/EG_OpenFont
  675.  
  676. NAME
  677.   EG_OpenFont   opens a font
  678.  
  679. SYNOPSIS
  680.   font = EG_OpenFont(attr)
  681.   D0                 A0
  682.  
  683.   EG_EFontPtr  font;
  684.   TextAttr *   attr;
  685.  
  686. FUNCTION
  687.   Opens a diskfont, and does some additional work, to optimize text rendering.
  688.  
  689. INPUTS
  690.   attr       : TextAttr structure known from graphics
  691.  
  692. RETURNS
  693.   an open font (EG_EFont) or NULL if not successfull
  694.  
  695.  
  696.  
  697. egsgfx.library/EG_ReadPixel
  698.  
  699. NAME
  700.   EG_ReadPixel   reads a pixel
  701.  
  702. SYNOPSIS
  703.   color = EG_ReadPixel(rast, x, y)
  704.   D0                   A0    D0 D1
  705.  
  706.   ULONG            color;
  707.   EG_RastPortPtr   rast;
  708.   WORD             x, y;
  709.  
  710. FUNCTION
  711.   Returns a pixels color.
  712.  
  713. INPUTS
  714.  
  715. RETURNS
  716.   color or -1 if the color can not be find
  717.  
  718.  
  719. egsgfx.library/EG_RectFill
  720.  
  721. NAME
  722.   EG_RectFill    fill rectangular area
  723.  
  724. SYNOPSIS
  725.   EG_RectFill(rast, x, y, w, h)
  726.            A0    D0 D1 D2 D3
  727.  
  728.   EG_RastPortPtr   rast;
  729.   WORD             x, y, w, h;
  730.  
  731. FUNCTION
  732.   Fills a rectangular area according to the actual drawmode and aPen.
  733.  
  734. INPUTS
  735.  
  736. RETURNS
  737.  
  738.  
  739.  
  740. egsgfx.library/EG_RemoveClipRegion
  741.  
  742. NAME
  743.   EG_RemoveClipRegion    remove clipregion
  744.  
  745. SYNOPSIS
  746.   rect = EG_RemoveClipRegion(rast)
  747.   D0                         A0
  748.  
  749.   EB_ClipRectPtr   rect;
  750.   EG_RastPortPtr   rast;
  751.  
  752. FUNCTION
  753.   Removes the current clip region from a rastport, and returns it. All
  754.   later graphics operations are only clipped using layer information.
  755.  
  756. INPUTS
  757.  
  758. RETURNS
  759.   the old clipregion
  760.  
  761.  
  762. egsgfx.library/EG_ScrollRastPort
  763.  
  764. NAME
  765.   EG_ScrollRastPort   scroll rectangular area in a rastport
  766.  
  767. SYNOPSIS
  768.   EG_ScrollRastPort(rast, xs, ys, w, h, dx, dy)
  769.             A0    D0  D1  D2 D3 D4  D5
  770.  
  771.   EG_RastPortPtr  rast;
  772.   WORD            xs, ys, w, h, dx, dy;
  773.  
  774. FUNCTION
  775.   Scrolls a rectangular area in a rastport. Modiies the damage list of
  776.   a layer if necessary and sends a refresh message.
  777.  
  778. INPUTS
  779.   rast    : destination rastport
  780.   xs, ys  : upper left edge
  781.   w, h    : size of rectangular area
  782.   dx, dy  : destination and amount in which to scroll
  783.  
  784. RETURNS
  785.  
  786.  
  787.  
  788. egsgfx.library/EG_SetAPen
  789.  
  790. NAME
  791.   EG_SetAPen   modifies froeground pen
  792.  
  793. SYNOPSIS
  794.   EG_SetAPen(rast, color)
  795.          A0    D0
  796.  
  797.   EG_RastPortPtr  rast;
  798.   ULONG           color;
  799.  
  800. FUNCTION
  801.   Modifies the color of the froeground pen.
  802.  
  803. INPUTS
  804.  
  805. RETURNS
  806.  
  807.  
  808.  
  809. egsgfx.library/EG_SetBPen
  810.  
  811. NAME
  812.   EG_SetBPen    modifies background pen
  813.  
  814. SYNOPSIS
  815.   EG_SetBPen(rast, color)
  816.          A0    D0
  817.  
  818.   EG_RastPortPtr  rast;
  819.   ULONG           color;
  820.  
  821. FUNCTION
  822.   Modifies the color of the background pen.
  823.  
  824. INPUTS
  825.  
  826. RETURNS
  827.  
  828.  
  829.  
  830. egsgfx.library/EG_SetDrMd
  831.  
  832. NAME
  833.   EG_SetDrMd   modifies the current drawmode
  834.  
  835. SYNOPSIS
  836.   EG_SetDrMd(rast, mode)
  837.          A0    D0
  838.  
  839.   EG_RastPortPtr  rast;
  840.   UBYTE           mode;
  841.  
  842. FUNCTION
  843.   Modifies the current drawmode to mode.
  844.  
  845. INPUTS
  846.  
  847. RETURNS
  848.  
  849.  
  850.  
  851. egsgfx.library/EG_SetFont
  852.  
  853. NAME
  854.   EG_SetFont   defines current font
  855.  
  856. SYNOPSIS
  857.   EG_SetFont(rast, font)
  858.          A0    A1
  859.  
  860.   EG_RastPortPtr rast;
  861.   EG_EFontPtr    font;
  862.  
  863. FUNCTION
  864.   Sets a new font for a rastport. This has to be a EG_EFont, which has been
  865.   opened using EG_OpenFont.
  866.  
  867. INPUTS
  868.  
  869. RETURNS
  870.  
  871.  
  872.  
  873. egsgfx.library/EG_SetMask
  874.  
  875. NAME
  876.   EG_SetMask
  877.  
  878. SYNOPSIS
  879.   EG_SetMask(rast, mask)
  880.          A0    D0
  881.  
  882.   EG_RastPortPtr  rast;
  883.   ULONG           mask;
  884.  
  885. FUNCTION
  886.  
  887. INPUTS
  888.  
  889. RETURNS
  890.  
  891.  
  892.  
  893. egsgfx.library/EG_SetSoftStyle
  894.  
  895. NAME
  896.   EG_SetSoftStyle
  897.  
  898. SYNOPSIS
  899.   old = EG_SetSoftStyle(rast, style, mask)
  900.   D0                    A0    D0     D1
  901.  
  902.   EG_RastPortPtr  rast;
  903.   ULONG           style, mask, old;
  904.  
  905. FUNCTION
  906.   Sets a text softwarestyle for an rastport.
  907.  
  908. INPUTS
  909.   style    : new values
  910.   nask     : mask for bits to change
  911.  
  912. RETURNS
  913.  
  914.  
  915.  
  916. egsgfx.library/EG_StdFont
  917.  
  918. NAME
  919.   EG_StdFont
  920.  
  921. SYNOPSIS
  922.   font = EG_StdFont()
  923.   D0
  924.  
  925.   EG_EFontPtr   font;
  926.  
  927. FUNCTION
  928.   The EGSBlit library has a special font which can be written extremely
  929.   quick.  That font (8 by 10 Pixels non-proportional) should be used whenever
  930.   fast text output is wanted.  As it must not be opened by "OpenFont", a
  931.   handle to it is obtained by "StdFont".
  932.  
  933. INPUTS
  934.  
  935. RETURNS
  936.   E_FontPtr to the standard font
  937.  
  938.  
  939.  
  940. egsgfx.library/EG_Text
  941.  
  942. NAME
  943.   EG_Text    render text into a rastport
  944.  
  945. SYNOPSIS
  946.   EG_Text(rast, text, len)
  947.       A0    A1    D0
  948.  
  949.   EG_RastPortPtr   rast;
  950.   CHAR *           text;
  951.   WORD             len;
  952.  
  953. FUNCTION
  954.   Renders a text into a rastport at the current cursorposition, using
  955.   current font and drawmode. After this operation the graphiccursor is
  956.   located at the end of the text.
  957.  
  958. INPUTS
  959.  
  960. RETURNS
  961.  
  962.  
  963.  
  964. egsgfx.library/EG_TextLength
  965.  
  966. NAME
  967.   EG_TextLength   evaluates the width of a text
  968.  
  969. SYNOPSIS
  970.   length = EG_TextLength(rast, text, len)
  971.   D0                     A0    A1    D0
  972.  
  973.   WORD            length;
  974.   EG_RastPortPtr  rast;
  975.   CHAR *          text;
  976.   WORD            len;
  977.  
  978. FUNCTION
  979.   Evaluates the width of a text, as if it would be rendered using EG_Text.
  980.  
  981. INPUTS
  982.  
  983. RETURNS
  984.   width in pixels
  985.  
  986.  
  987.  
  988. egsgfx.library/EG_WritePixel
  989.  
  990. NAME
  991.   EG_WritePixel   writes a pixel
  992.  
  993. SYNOPSIS
  994.   EG_WritePixel(rast, x, y)
  995.         A0    D0 D1
  996.  
  997.   EG_RastPortPtr   rast;
  998.   WORD             x, y;
  999.  
  1000. FUNCTION
  1001.   Writes a pixel in to rastport, using the current drawmode and aPen.
  1002.  
  1003.  
  1004. INPUTS
  1005.  
  1006. RETURNS
  1007.  
  1008.  
  1009.  
  1010.